using ServiceDefaults;

var builder = WebApplication.CreateBuilder(args);

// 添加 Aspire 服务默认配置
builder.AddServiceDefaults();

// 基础服务
builder.Services.AddControllers();
builder.Services.AddOpenApi();

var app = builder.Build();

// 映射服务默认配置
app.MapDefaultEndpoints();

if (app.Environment.IsDevelopment())
{
    app.MapOpenApi();
}
app.UseRouting();
app.MapControllers();
app.Run();
